home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Whiteline: delta
/
whiteline CD Series - delta.iso
/
tools
/
utils
/
twtcp122
/
pktdrv
/
pktdlink
/
pktdrv.h
< prev
next >
Wrap
Text File
|
1995-11-25
|
1KB
|
58 lines
/********************************************************************/
/* */
/* Packet driver for AMD LANCE ethernet controller */
/* */
/* Copyleft by H. Wieser, 1992 TU-Vienna IAEE */
/* All rights reserved */
/* */
/********************************************************************/
/* definitions for packet driver interface*/
#define PKTCOOKIE 0x5f504b54L /* "_PKT" */
#define ET_IP 0x800
#define ET_ARP 0x806
#define ET_RARP 0x8035
typedef int HANDLE;
#define NETRESET 0
#define NETOPEN 1
#define NETRELEASE 2
#define NETSEND 3
#define NETGETADR 4
#define NETINFO 5
#define NETPKTALLOC 6
#define NETPKTFREE 7
typedef int(*pkt_hndl)(int,char *); /* type of upcall function */
int net_info(int, char *);
int net_open(int, int (*)(int,char *));
int net_release(int);
int net_send(int, char *);
int net_getadr(int,char *);
int net_reset(void);
PKTBUF *net_pktalloc(u_short);
int net_pktfree(PKTBUF *);
typedef struct
{
char dest[6];
char src[6];
unsigned type;
char data[1518];
} PACKET;
#define EPROTAVAIL -1
#define EPROTUSED -2
#define EHANDLE -3
#define EPROTBUSY -4
#define EINIT -5
#define EPARAM -6
#define EPKTLEN -7
#define ECOLLISION -8
#define ETIMEOUT -9